package main

import "fmt"

// defer与return执行先后顺序，先执行return，再执行defer

func deferFunc() int {
	fmt.Println("defer func execute")
	return 0
}
func returnFunc() int {
	fmt.Println("return func execute")
	return 0
}

func deferAndReturnFunc() int {
	defer deferFunc()
	return returnFunc()
}
